package com.exposit.books.service;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.exposit.books.dao.NewBooksDAO;
import com.exposit.books.domain.NewBooks;

@Service
@Transactional
public class NewBooksServiceImpl implements NewBooksService {

	@Autowired
	private NewBooksDAO newbooks;
	@Override
	public List<NewBooks> getAllNewBooks() {
		// TODO Auto-generated method stub
		List <NewBooks> newbook = new ArrayList <NewBooks>();
		List <NewBooks> books = newbooks.getAll();
		for (NewBooks b: books){
			newbook.add(b);
		}
		return newbook;
	}



}
